Carbon


DrawThemeWindowFrame

Header: Appearance.h Carbon status: Supported

Draws a window frame.

OSStatus DrawThemeWindowFrame (
    ThemeWindowType flavor, 
    const Rect *contRect, 
    ThemeDrawState state, 
    const ThemeWindowMetrics *metrics, 
    ThemeWindowAttributes attributes, 
    WindowTitleDrawingUPP titleProc, 
    UInt32 titleData
);
flavor

A value of type ThemeWindowType. Pass a constant specifying the type of window for which to draw a frame. See “Theme Window Type Constants” for descriptions of possible values.

contRect

A pointer to a structure of type Rect. Before calling DrawThemeWindowFrame, specify the rectangle for which you wish to draw a window frame, in coordinates local to the current port. This rectangle is typically the content rectangle of a window.

state

A value of type ThemeDrawState. Pass a constant—either kThemeStateActive or kThemeStateInactive—appropriate to the current state of the window. See “Theme Draw State Constants” for descriptions of these values.

metrics

A pointer to a structure of type ThemeWindowMetrics. Before calling DrawThemeWindowFrame, set the structure to describe the window for which to draw a frame.

attributes

A value of type ThemeWindowAttributes. Pass one or more constants corresponding to the window’s current visual attributes. See “Theme Window Attribute Constants” for descriptions of possible values. Pass 0 if the window has none of the enumerated attributes.

titleProc

A value of type WindowTitleDrawingUPP. If you pass the value kThemeWindowHasTitleText in the attributes parameter, you should pass a universal function pointer to an application-defined function such as that described in WindowTitleDrawingProcPtr in the titleProc parameter. DrawThemeWindowFrame calls that function to draw the window’s title. Pass NULL if there is no title to be drawn.

titleData

An unsigned 32-bit integer. Provide any data to be passed in to the userData parameter of the callback function specified in the titleProc parameter.

function result

A result code.

DISCUSSION

The DrawThemeWindowFrame function draws a window frame appropriate to the specified window type. You may use DrawThemeWindowFrame to make a custom window theme-compliant.

VERSION NOTES

This function is available with Appearance Manager 1.1 and later.

AVAILABILITY

Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)